<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>

<!DOCTYPE HTML>
<html>
<head>
    <%@ include file="/platform/style.jsp" %>
    <style>

    </style>
    <script>

        function add() {
            window.parent.$w.openDialog({
                url: ctx + '/information/SkeywordPage@show.page',
                title: "添加搜索关键字 ",
                w: 600,
                h: 260,
                afterClose: function (re) {
                    if (re) $w.execForm();
                }
            });
        }
        function edit(id) {
            window.parent.$w.openDialog({
                url: ctx + '/information/SkeywordPage@show.page?bean.id=' + id,
                title: "编辑搜索关键字 ",
                w: 600,
                h: 260,
                afterClose: function (re) {
                    if (re) $w.execForm();
                }
            });
        }
        function del(id) {
            window.parent.$w.confirmMsg("确定删除？", function (r) {
                if (r) {
                    $w.doUrl(ctx + "/information/SkeywordPage@del.page?bean.id=" + id, {}, function (json) {
                        $w.execForm();
                    })
                }
            })
        }
    </script>
</head>

<body class="easyui-layout">
<div data-options="region:'center'" class="bodybg">
    <!-- 查询区域 -->
    <form id="queryForm" action="/information/SkeywordPage.page" method="post">
        <div class="easyui-panel ui-toolBar" border="false" data-options="doSize:false">
            <a href="javascript:;" class="easyui-linkbutton" plain="true" onclick="add()" style="width:50px;">添加</a>
        </div>
        <div class="ui_line" style="margin-top:10px"></div>
        <!-- 数据列表区域 -->
        <table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:true,
																								pageNum:<w:write bind="pageNum"/>,
																								pageSize:<w:write bind="pageSize_"/>,
																								total:<w:write bind="pagination.totalCount"/>">
            <thead>
            <tr class="ui_th">
                <td width="40">ID</td>
                <td width="180">关键字</td>
                <td>关键字链接</td>
                <td>关键字类型</td>
                <td>排序</td>
                <td width="160">加入时间</td>
                <td width="150" align="center">修改</td>
            </tr>
            </thead>
            <tbody>
            <w:iterate id="info" bind="resultList_">
                <tr class="ui_td">
                    <td><w:write bind="#info.id"/></td>
                    <td><w:write bind="#info.name"/></td>
                    <td><w:write bind="#info.url"/></td>
                    <td>
                        <w:equal bind="#info.type" value="">通用</w:equal>
                        <w:equal bind="#info.type" value="1">微信</w:equal>
                        <w:equal bind="#info.type" value="2">官网</w:equal>
                    </td>
                    <td><w:write bind="#info.orderno"/></td>
                    <td><w:write bind="#info.intime" format="yyyy-MM-dd HH:mm"/></td>
                    <td align="center">
                        <a href="javascript:void(0);" class="ui_btn marginR8"
                           onclick="edit(<w:write bind="#info.id"/>)">修改</a><a href="javascript:void(0);" class="ui_btn"
                                                                               onclick="del(<w:write
                                                                                       bind="#info.id"/>)">删除</a>
                    </td>
                </tr>
            </w:iterate>
            </tbody>
        </table>
    </form>
</div>
</body>
</html>
